#include "bubble.c"
int sorted (int *array, int length)
{ /* ... check */ }
#define SIZE ...
int main (int argc, char **argv)
{ int array[SIZE];
/* ... array initialisation */
bubblesort (array, SIZE);
//assert (sorted (array, SIZE));
return (0); }

 
void bubblesort (int *array, int length)
 {
  int i, j;
 
  for (i = 0; i < length - 1; ++i)
   { for (j = 0; j < length - i - 1; ++j)
      { if (array[j] > array[j + 1])
         { int tmp = array[j];
 
           array[j] = array[j + 1];
           array[j + 1] = tmp; }
      } }
 }